﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class GiaoDienClient_TrangYKienPhuHuynh : System.Web.UI.Page
{
    SoLienLacDataContext db = new SoLienLacDataContext();
    string tengv;
    string magv;
    protected void Page_Load(object sender, EventArgs e)
    {
        tengv=Request.QueryString["TenCanBoGV"];
        magv = Request.QueryString["MaCanBoGV"];
        if (!IsPostBack)
        {
            lblGiaoVien.Text = tengv;
            lblMa.Text = magv;
        }
    }
    protected void btnDongY_Click(object sender, EventArgs e)
    {

        if (txtTieuDe.Text != "" && FCKeditor1.Value != "")
        {
            YKienPhuHuynh yk = new YKienPhuHuynh();
            yk.MaCanBoGV =lblMa.Text;
            yk.MaHS = Session["Username"].ToString();
            yk.TieuDe = txtTieuDe.Text;
            yk.NoiDungYKien = FCKeditor1.Value;
            yk.TrangThaiTraLoi = false;
            yk.NgayGui = DateTime.Now;
            db.YKienPhuHuynhs.InsertOnSubmit(yk);
            db.SubmitChanges();
            Response.Redirect("TrangThongTinChiTietDiem.aspx");

        }
    }
    protected void btnTuChoi_Click(object sender, EventArgs e)
    {
        txtTieuDe.Text = "";
        FCKeditor1.Value = "";
    }
}